<template>
	<view class="x-nurse-item">
		<view class="avatar-box">
			<u-avatar :src="item.avatar" size="80rpx"></u-avatar>
		</view>
		<view class="right-content">
			<view class="top">
				<text class="name">{{item.nickName}}</text>
				<view class="icon-label second">
					<image class="icon" mode="aspectFill" src="@/static/images/nurse_2.png"></image>
					<text class="label">{{item.userType==='20'?item.escortLevel:item.careWorkerLevel}}</text>
				</view>
			</view>
			<view class="info">
				<text class="position">职能：{{userTypeOptions[item.userType]}}</text><text class="year">从业：{{item.workYears}}年</text>
			</view>
			<!-- <view class="tags">
				<view class="tags-item">
					<text class="x-border-tag">专业知识强</text>
				</view>
				<view class="tags-item">
					<text class="x-border-tag">好沟通</text>
				</view>
				<view class="tags-item">
					<text class="x-border-tag">待人亲切</text>
				</view>
			</view> -->
			<view class="introduce">
				<text class="i-txt">{{item.favorableRate}}%好评率</text><text class="i-txt">陪诊数：{{item.escortCount}}</text><text class="i-txt">{{item.appointmentCount}}人发起预约</text>
			</view>
			<view class="price-btn">
				<!-- 隐藏 -->
				<!-- <view class="price">
					<text class="p-txt">89</text><text class="p-label">元/小时</text>
				</view> -->
				<view class="btn">
					<u-button text="立即预约" :hairline="false" :customStyle="miniBtnStyle" shape="square" color="#386FFF"
						@click=""></u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: [Object, String],
				default: {}
			}
		},
		data() {
			return {
				userTypeOptions: {
					'20': '陪诊',
					'30': '护理'
				}
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.x-nurse-item {
		padding: 35rpx 30rpx 30rpx;
		background: #fff;
		border-radius: 12rpx;
		display: flex;

		.avatar-box {
			width: 80rpx;
			height: 80rpx;
		}

		.right-content {
			flex: 1;
			min-width: 0;
			padding-left: 20rpx;

			.top {
				margin-bottom: 7rpx;
				display: flex;
				align-items: center;

				.name {
					// font-weight: 600;
					margin-right: 30rpx;
				}

				.icon-label {
					display: flex;
					align-items: center;

					&.first {
						.label {
							color: #40C414;
						}
					}

					&.second {
						.label {
							color: #616DEF;
						}
					}

					&.third {
						.label {
							color: #EC6900;
						}
					}

					.icon {
						display: block;
						width: 20rpx;
						height: 20rpx;
						margin-right: 10rpx;
					}

					.label {
						font-size: 18rpx;
					}
				}
			}

			.info {
				margin-bottom: 15rpx;
				font-size: 24rpx;
				color: $uni-color-666;

				.position {
					margin-right: 100rpx;
				}
			}

			.tags {
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				.tags-item {
					margin: 0 20rpx 15rpx 0;

					&:last-child {
						margin-right: 0;
					}
				}
			}

			.introduce {
				font-size: 22rpx;
				color: $uni-color-999;
				margin-bottom: 20rpx;
				display: flex;

				.i-txt {
					flex: 1;
					padding-right: 10rpx;
				}
			}

			.price-btn {
				display: flex;
				align-items: center;
				// justify-content: space-between;
				justify-content: flex-end;

				.price {
					.p-txt {
						color: $uni-price-color;
					}

					.p-label {
						font-size: 18rpx;
						color: $uni-color-999;
					}
				}

				.btn {
					width: 140rpx;
					height: 48rpx;

					/deep/ .u-button__text {
						font-size: 26rpx !important;
					}
				}
			}
		}
	}
</style>
